<?php
require('includes/top.php');

foreach($_POST as $key => $value)
{
if($value!="" && $value!="Save")
{
$data = $key.'_'.$value;

$laptop_remarks_array = explode('_',$data);
$remarks = $laptop_remarks_array[2];

$product_id = $laptop_remarks_array[1];
$serial_id = GetLapSerial($product_id);

$card_no = $_REQUEST['card_no'];



$sql="UPDATE laptop_details SET `laptop_type` = 'O' where laptop_id ='".$product_id."'";
$result=mysql_query($sql);

$sql1="UPDATE used_accessories_data SET `laptop_id` = '".$product_id."' where card_no ='".$card_no."'";
$result1=mysql_query($sql1);
}
}

if($result>0)
{
header('Location:assign_substitute.php?v=success');
}
else
{
header('Location:assign_substitute.php?v=err');
}
?>